package cwinsor.raking.year2014;

import java.util.Map;

/* A RakerPropertyVirtual is a property which is computed
 * on the fly - in other words it's value is determined
 * from the value of by other properties.  As part of construction
 * the class takes in a reference to the map which holds properties.
 * 
 * This is an abstract class - it is derived classes that implement
 * the getValue methods.
 */
public abstract class PropertyVirtual extends PropertyBase {

	protected Map<PROP_E,PropertyBase> propertyMap;


	/*
	 * set the map from which this property can compute its value
	 */
	public void setPropertySourcesForVal(Map<PROP_E, PropertyBase> aPropertyMap) {
		propertyMap = aPropertyMap;
	}

	/*
	 * this class does not support setting a value
	 */
	public void setPropertyValFromString(String string) {
		Msg.fatal(dM + ": this is a virtual property - the value can not be set");
	}

	// debug
	String dM = this.getClass().getSimpleName();
}
